/**
 * mockjs
 * @see: http://mockjs.com/examples.html
 * ThinkPHP 资源控制器: index, read, save, update, delete
 * Laravel 资源控制器: index, show, store, update, destory
 */
import Mock from 'better-mock'
import DltOrderMock from './modules/DltOrderMock'


Mock.setup({
    timeout: '200-600'
})

Mock.mock("/test", (option) => {
    console.log(option);
    return 'ok';
})
// 订单模块
Mock.mock(RegExp('/api/dlt_order/option' + ".*"), option => DltOrderMock.option(option));
Mock.mock(RegExp('/api/dlt_order/index' + ".*"), option => DltOrderMock.index(option));
Mock.mock(RegExp('/api/dlt_order/read' + ".*"), option => DltOrderMock.read(option));
Mock.mock('/api/dlt_order/save', 'post', option => DltOrderMock.save(option));
Mock.mock('/api/dlt_order/update', 'post', option => DltOrderMock.update(option));
Mock.mock(RegExp('/api/dlt_order/delete' + ".*"), 'delete', option => DltOrderMock.delete(option));
